package com.xnfh.equipment.viewmodel

import com.xnfh.common.bean.GateWayTotalInfoBean
import com.xnfh.equipment.viewmodel.base.BaseTokenViewModelRes
import com.xnfh.framework.bean.RespStateData
import com.xnfh.network.manager.ApiManager
import okhttp3.RequestBody

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/12/25 14:58
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/12/25 14:58
 * @UpdateRemark: 更新说明
 */
class KcEquipmentDetailViewModelRes : BaseTokenViewModelRes() {

    suspend fun requestKcDetail(gatewayId: String, data: RespStateData<GateWayTotalInfoBean>) =
        dealResp(
            { ApiManager.api.requestKcDetail(gatewayId) }, data
        )

    suspend fun requestColosOpenFm(body: RequestBody, data: RespStateData<Any>) =
        dealResp(
            { ApiManager.api.requestDevice(body) }, data
        )
    suspend fun requestColosOpenJiaob(body: RequestBody, data: RespStateData<Any>) =
        dealResp(
            { ApiManager.api.requestDeviceV2Jiaob(body) }, data
        )
    suspend fun requestColosOpenV2Fm(body: RequestBody, data: RespStateData<Any>) =
        dealResp(
            { ApiManager.api.requestDeviceV2Fm(body) }, data
        )
}